package com.middlegroup.pay.mapper;

import com.middlegroup.pay.entity.OutBills;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 出款订单表 Mapper 接口
 * </p>
 *
 * @author pc123
 * @since 2019-01-04
 */
public interface OutBillsMapper extends BaseMapper<OutBills> {


    /**根据中台订单号获取订单
     * @param billNo
     * @return
     */
    @Select("select * from t_out_bills where bill_no=#{billNo} ")
    OutBills getByBillNo(@Param("billNo") String billNo);

    /**根据商户编码与商户订单号获取订单
     * @param merchantCode
     * @param merchantBillNo
     * @return
     */
    @Select("select * from t_out_bills where merchant_code=#{merchantCode} and merchant_bill_no=#{merchantBillNo} ")
    OutBills getByMerchantBillNo(@Param("merchantCode") String merchantCode,@Param("merchantBillNo") String merchantBillNo);

}
